<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>then 方法 catch</title>
</head>
<body>
    <script>
        let p = new Promise((resolve, reject) => {
            reject('失败啦~~~');
            // resolve('OKOK');
        });

        // p.then(v => {}, r => {})
        //指定失败的回调, 处理失败的结果值
        p.catch(reason => {
            console.log(reason);
        });
    </script>
</body>
</html>